<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<title id="title">修德抄经堂</title>
	<link rel="stylesheet" type="text/css" href="../bower_components/mui/dist/css/mui.css">
	<link rel="stylesheet" type="text/css" href="../css/jingjin.css">
	<link rel="stylesheet" type="text/css" href="../css/base.css">
	<link rel="stylesheet" type="text/css" href="../css/full.css">
	<link rel="stylesheet" type="text/css" href="../css/cehua.css">
	<script src="../bower_components/mui/dist/js/mui.js"></script>
	<script src="../bower_components/jquery/dist/jquery.js"></script>
	<script src="../js/common.js"></script>
</head>
<body>
	<div id="mcover" style="display:none;">
	      <img src="../img/guide.png" />
	    </div>
<div class="mui-off-canvas-wrap mui-draggable mui-slide-in">
	<aside class="mui-off-canvas-left" id="offCanvasSide" style="visibility: visible;">
		<div class="mui-scroll-wrapper" style="overflow: visible;">
			<div id="cehua" class="mui-scroll">
				<ul>
					<a href="boruo.html">
						<li style="margin-top: 0;">
							<img src="../img/banruo.png" class="cover">
							<p class="same color">般若</p>
						</li>
					</a>
					<a href="jingjin.html">
						<li>
							<img src="../img/jingjin.png" class="cover">
							<p class="same color">精进</p>
						</li>
					</a>
					<a href="bushi.html">
						<li>
							<img src="../img/shiyuan.png" class="cover">
							<p class="same color">施愿</p>
						</li>
					</a>
					<a href="benxin.html">
						<li>
							<img src="../img/benxin.png" class="cover">
							<p class="same color">本心</p>
						</li>
					</a>
				</ul>

				<div id="erduo"></div>
			</div>
		</div>
	</aside>
	<div class="mui-inner-wrap">
		<div class="page">
			<!--<bg class="bg"><img src="../img/jjbg.png"></bg>-->
			<div class="content clearfix">
				<a href="./search.html">
					<div class="sousuo">
						<span><img src="../img/bore/search.png" class="cover"></span>
						<span>输入经书名称或关键字</span>
					</div>
				</a>
				<div class="main">
					<div class="left">
						<p class="same">精<br/>进</p>
						<img src="../img/jingjin.png">
					</div>
					<div class="right">
						<div class="bor_t_b" id="xingshu">
							<!--<p  class="same color ">《心经》王羲之行书线装本</p>-->
						</div>
						<div class="shuoming">
							<p class="p_l">2017.04.05发愿<br>本经共990字 </p>
							<p class="p_r">2017.05.05完成<br>已抄写990字</p>
						</div>
						<div class="fayuanwen">
							<p class="p_t color same">
								发愿文
								<!-- <span class="mui-icon mui-icon-compose edit-icon"></span> -->
								<span id="tijiao" class="edit-icon">提交</span>
							</p>
							<!-- <p class="p_zw color fang">愿过去佛，现在佛，未来佛，常说般若波罗蜜；愿一切受持者，比丘尼、信男、信女，所求如意，常行般若波罗蜜</p>  -->
							<textarea class="p_zw color" id="vow"></textarea>
						</div>
						<div class="tongxiu">
							<p class="p_t color same">同修人</p>
							<div id="gundong">
								<img class="tishi_img" src="../img/benxin/next.png">
								<div class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
									<div class="mui-scroll">
										<!--<a href="tongxiu.html">
			    				        <span class="mui-control-item mui-active">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a>
										<a href="tongxiu.html">
			    				        <span class="mui-control-item">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a>
										<a href="tongxiu.html">
			    				        <span class="mui-control-item">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a>
										<a href="tongxiu.html">
			    				        <span class="mui-control-item">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a>
										<a href="tongxiu.html">
			    				        <span class="mui-control-item">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a>
										<a href="tongxiu.html">
			    				        <span class="mui-control-item">
			    				            <img src="../img/benxin/tongxiuren.jpg">
			    				        </span></a> -->
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--
            	滚动区域
            -->
			<div id="scroll" style="height: 121px;">
				<ul class="tab">
					<li class="sel fang" data-input="1">未抄完</li>
					<li class="fang" data-input="0">已抄完</li>
					<li class="fang">同修中</li>
				</ul>
				<img class="tishi" src="../img/benxin/next.png">
				<div class="tab_div mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted" style="height: 252px;display: block;">
					<div style="height: 125px;" class="mui-scroll" id="weichaowan">
						<!-- <span class="mui-control-item mui-active">
                             <img src="../img/bore/book.png">
                         </span>
                         <span class="mui-control-item">
                             <img class="shuming" src="../img/bore/book.png">
                         </span>
                         <span class="mui-control-item">
                            <img class="shuming" src="../img/bore/book.png">
                         </span>
                         <span class="mui-control-item">
                            <img class="shuming" src="../img/bore/book.png">
                         </span>
                         <span class="mui-control-item">
                            <img class="shuming" src="../img/bore/book.png">
                         </span>
                         <span class="mui-control-item">
                            <img class="shuming" src="../img/bore/book.png">
                         </span>
                     -->
					</div>
					<ul class="btn">
						<li><a href="chaoxieer.html">
							<img src="../img/benxin/write.png">
							<p>抄写</p>
						</a></li>
						<a href="read_jingjin.html" id="read"><li>
							<img src="../img/benxin/read.png">
							<p>阅读</p>
						</li></a>
						<a href="javascript:;" id="yaoqing"><li>
							<img src="../img/benxin/yaoqing.png">
							<p>邀请</p>
						  </li>
					    </a>
					</ul>
				</div>
				<div class="tab_div mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted" style="height: 252px;display: none;">
					<div style="height: 125px;" class="mui-scroll" id="yichaowan">
						<!--    <span class="mui-control-item mui-active">
                                <img src="../img/bore/book.png">
                            </span>
                            <span class="mui-control-item">
                                <img class="shuming" src="../img/bore/book.png">
                            </span>
                            <span class="mui-control-item">
                               <img class="shuming" src="../img/bore/book.png">
                            </span>
                            <span class="mui-control-item">
                               <img class="shuming" src="../img/bore/book.png">
                            </span>
                            <span class="mui-control-item">
                               <img class="shuming" src="../img/bore/book.png">
                            </span>
                            <span class="mui-control-item">
                               <img class="shuming" src="../img/bore/book.png">
                            </span>
                           -->
					</div>
					<ul class="btn">
						<li><a href="yinshua.html">
							<img src="../img/benxin/wancheng.png">
							<p>印刷</p>
						</a></li>
						<a href="read_jingjin.html"><li>
							<img src="../img/benxin/read.png">
							<p>阅读</p>
						</li></a>
						<a href="javascript:;" id="fenxiang" ><li>
							<img src="../img/benxin/fenxiang.png">
							<p>分享</p>
						</li></a>
					</ul>
				</div>
				<div class="tab_div mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted" style="height: 252px;display: none;">
					<div style="height: 125px;" class="mui-scroll" id="tongxiuzhong">
						<!--        <span class="mui-control-item mui-active">
                                   <img src="../img/bore/book.png">
                               </span>
                               <span class="mui-control-item">
                                   <img class="shuming" src="../img/bore/book.png">
                               </span>
                               <span class="mui-control-item">
                                  <img class="shuming" src="../img/bore/book.png">
                               </span>
                               <span class="mui-control-item">
                                  <img class="shuming" src="../img/bore/book.png">
                               </span>
                               <span class="mui-control-iwtem">
                                  <img class="shuming" src="../img/bore/book.png">
                               </span>
                               <span class="mui-control-item">
                                  <img class="shuming" src="../img/bore/book.png">
                               </span>
                       -->
					</div>
					<ul class="btn">
						<li><a id="zhuchao">
							<img src="../img/benxin/write2.png">
							<p>助抄</p>
						</a></li>
						<a href="caoxuexuanze.html"><li>
							<img src="../img/benxin/write.png">
							<p>自抄</p>
						</li></a>
					</ul>
				</div>
			</div>
		</div>


	</div>
	</div>



</body>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                docEl.style.fontSize = 100 * (clientWidth / 320) + 'px';
            };

        // Abort if browser does not support addEventListener
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>
<script> //分享
        $('#fenxiang').on('tap',function () {
            $("#mcover").css("display","block");
        })
        $("#mcover").click(
            function(){
                $("#mcover").css("display","none");  // 点击弹出层，弹出层消失
            }
        );
</script>
<script>

	$('#scroll .tab li').each(function(i){
		$('#scroll .tab li').eq(i).css('z-index',$('#scroll .tab li').length-i+1);
	});
	$('#scroll .tab li').click(function(){
		var i = $(this).index();
		$('#scroll .tab li').removeClass('sel');
		$('#scroll .tab li').css("z-index",$('#scroll .tab li').length);
		$("#scroll .tab_div").css("display","none");
		$(this).addClass('sel');
		$(this).css("z-index",$('#scroll .tab li').length+1);
		$("#scroll .tab_div").eq(i).css("display","block");

		$('#scroll .tab li').each(function(i){
			if(!$('#scroll .tab li').eq(i).hasClass('sel')){
				$('#scroll .tab li').eq(i).css('z-index',$('#scroll .tab li').length-i+1);
			}
		})
	})
	$('.main .right').width($('.main').width()-$('.main .left').width());

	$('#gundong .mui-scroll-wrapper').height($('#gundong>.mui-control-item>img').height())
	$('#gundong .mui-scroll').height($('#gundong>.mui-control-item>img').height())

	$(".sousuo").click(function(){

		location.href='./search.html'
	});

</script>
<script>
	$(function () {

		var weichaowan = '';
		$.ajax({
			url: '/fe/transcript/sutra_editions',
			data: {
				"type": 0,
				"limit": 200,
				"offset": 0,
			},
			async: false,
			success: function (data) {
				var data = data.data;
				for(var i=data.length-1;i>-1;i--) {
					weichaowan += '<a class="mui-control-item" data-id="'+data[i].id+'" data-user_transcription_id="'+data[i].user_transcription_id+'" data-name="'+data[i].name+'" href="#'+data[i].id+'" style="display:inline-block;">' +
							'<img src="'+data[i].cover_url+'">' +
							'</a>'

				};
				$('#weichaowan').append(weichaowan);
				$('#weichaowan a').eq(0).addClass('mui-active');

			}
		});
		var yichaowan = '';
		$.ajax({
			url: '/fe/transcript/sutra_editions',
			data: {
				"type": 1,
				"limit": 200,
				"offset": 0,
			},
			async: false,
			success: function (data) {
				var data = data.data;
				for(var i=data.length-1;i>-1;i--) {
					yichaowan += '<a class="mui-control-item" data-id="'+data[i].id+'" data-user_transcription_id="'+data[i].user_transcription_id+'" data-name="'+data[i].name+'" href="#'+data[i].id+'" style="display:inline-block;">' +
							'<img src="'+data[i].cover_url+'">' +
							'</a>'
				};
				$('#yichaowan').append(yichaowan);
				$('#yichaowan a').eq(0).addClass('mui-active');

			}
		});
		var tongxiuzhong = '';
		$.ajax({
			url: '/fe/transcript/sutra_editions',
			data: {
				"type": 2,
				"limit": 200,
				"offset": 0,
			},
			async: false,
			success: function (data) {
				var data = data.data;
				console.log(data)
				for(var i=data.length-1;i>-1;i--) {
					tongxiuzhong += '<a class="mui-control-item" data-id="'+data[i].id+'" data-user_transcription_id="'+data[i].user_transcription_id+'" data-name="'+data[i].name+'" href="#'+data[i].id+'" style="display:inline-block;">' +
							'<img src="'+data[i].cover_url+'">' +
							'</a>'
				};
				$('#tongxiuzhong').append(tongxiuzhong);
				$('#tongxiuzhong a').eq(0).addClass('mui-active');

			}
		});
		var selectId = $('#weichaowan a').eq(0).data('user_transcription_id');

		$('.mui-control-item').each(function (index) {
			$(this).on('tap', function(i){
				selectId = $(this).data('user_transcription_id');
				versionId = $(this).data('id');
				localStorage.setItem('userTranscriptionID', selectId);
				localStorage.setItem('versionId', versionId);
				changeText();
			});
		});

		function changeText() {
			$('#gundong .mui-scroll').empty();
			$.ajax({
				url: '/fe/transcript/user_transcription/'+selectId,
				data: {
					"type": 0,
				},
				success: function (data) {
					var data = data.data;
					var end_time = data.end_time == null  ? '未' : parseISODate(data.end_time).format("yyyy.MM.dd")
					if (data.vow_time != null) var vow_time = parseISODate(data.vow_time).format("yyyy.MM.dd")
					else vow_time = "未";
					var text = '<p class="same color">'+data.sutra_info.name+'</p>'
					var zishu = '<p class="p_l">'+vow_time+'发愿<br>本经共'+data.sutra_info.total_char_num+'字 </p><p class="p_r">'+end_time+'完成<br>已抄写'+data.finish_char_num+'字</p>'
                    $('#xingshu').empty().append(text);
                    $('#vow').val("");
					$('#vow').val(data.vow_text);
					$('.shuoming').empty().append(zishu);
				}
			})
            // $.ajax({
            //     url:'/fe/transcript/user_transcription/'+selectId+'/finish',
            //     success:function (data) {
            //         var end_time = data.data.finish_time == null  ? '未' : parseISODate(data.data.finish_time).format("yyyy.MM.dd")
            //         $('.p_r').empty().append(end_time+'完成<br>已抄写')
            //     }
            // })
			//zhuchaoren
			$.ajax({
				url: '/fe/transcript/user_transcription/'+selectId,
				data: {
					"type": 0,
				},
				async: false,
				success: function (data) {
					var data=data.data;
					for (var i= 0,len=data.assistants.length;i<len;i++){
						var tongxiuren='';
						if (data.assistants[i].uid == localStorage.getItem('uid')){
							tongxiuren = '<a href="tongxiu.html">'+
								'<span class="mui-control-item mui-active">'+
								'<img src="'+data.owner_user.avatar_url+'">'+
								'</span></a>'
						$('#gundong .mui-scroll').append(tongxiuren);
						}
						else{
						tongxiuren = '<a href="tongxiu.html">'+
								'<span class="mui-control-item mui-active">'+
								'<img src="'+data.assistants[i].avatar_url+'">'+
								'</span></a>'
						$('#gundong .mui-scroll').append(tongxiuren);	
						}
						
					}
				}
			})
		}
		changeText();

		$('.fang').on('tap', function(i){
			// console.log('sssss')
			input = $(this).data('input')
			if (input==1) {
				$('#vow').removeAttr('disabled');
				$('.edit-icon').show();
			}else{
				$('#vow').attr('disabled', "disabled");
				$('.edit-icon').hide();
			}

		})

		$("#tijiao").on("tap", function(i){
			var csrftoken = getCookie('csrftoken');
			var userTranscriptionID = localStorage.getItem('userTranscriptionID');
			text = $('#vow').empty().val();
			api = '/fe/transcript/user_transcription/' + userTranscriptionID + '/vow'
			$.ajax({
				url: api,
				type: 'PUT',
				data: {
					"vow_text": text,
				},
				beforeSend: function(xhr, settings) {
					xhr.setRequestHeader("X-CSRFToken", csrftoken);
				},
				success: function (data) {
					console.log('success')
				}
			})
		})
	})
</script>
<script>
    mui.init();
    mui('body').on('tap','.tab li',function(){
        function changeText() {
            $('#gundong .mui-scroll').empty();
            $.ajax({
                url: '/fe/transcript/user_transcription/'+selectId,
                data: {
                    "type": 0,
                },
                success: function (data) {
                    var data = data.data;
                    var end_time = data.end_time == null  ? '未' : parseISODate(data.end_time).format("yyyy.MM.dd")
                    if (data.vow_time != null) var vow_time = parseISODate(data.vow_time).format("yyyy.MM.dd")
                    else vow_time = "未";
                    var text = '<p class="same color">'+data.sutra_info.name+'</p>'
                    var zishu = '<p class="p_l">'+vow_time+'发愿<br>本经共'+data.sutra_info.total_char_num+'字 </p><p class="p_r">'+end_time+'完成<br>已抄写'+data.finish_char_num+'字</p>'
                    $('#xingshu').empty().append(text);
                    $('#vow').val("");
                    $('#vow').val(data.vow_text);
                    $('.shuoming').empty().append(zishu);
                }
            })
            // $.ajax({
            //     url:'/fe/transcript/user_transcription/'+selectId+'/finish',
            //     success:function (data) {
            //         var end_time = data.data.finish_time == null  ? '未' : parseISODate(data.data.finish_time).format("yyyy.MM.dd")
            //         $('.p_r').empty().append(end_time+'完成<br>已抄写')
            //     }
            // })
            //zhuchaoren
            $.ajax({
                url: '/fe/transcript/user_transcription/'+selectId,
                data: {
                    "type": 0,
                },
                async: false,
                success: function (data) {
                    var data=data.data;
                    for (var i= 0,len=data.assistants.length;i<len;i++){
                        var tongxiuren='';
                        if (data.assistants[i].uid == localStorage.getItem('uid')){
                            tongxiuren = '<a href="tongxiu.html">'+
                                '<span class="mui-control-item mui-active">'+
                                '<img src="'+data.owner_user.avatar_url+'">'+
                                '</span></a>'
                            $('#gundong .mui-scroll').append(tongxiuren);
                        }
                        else{
                            tongxiuren = '<a href="tongxiu.html">'+
                                '<span class="mui-control-item mui-active">'+
                                '<img src="'+data.assistants[i].avatar_url+'">'+
                                '</span></a>'
                            $('#gundong .mui-scroll').append(tongxiuren);
                        }

                    }
                }
            })
        }
        $(this).addClass('sel').siblings().removeClass('sel');
        var i = $(this).index();
        if (i==0){
            var selectId = $('#weichaowan .mui-active').data('user_transcription_id');changeText();
        }
        else if(i == 1){
            var selectId = $('#yichaowan .mui-active').data('user_transcription_id');
            changeText();
            $('.tab_div').eq(1).find('.btn a').eq(1).attr('href','read_jingjin.html?x=yiwancheng');
        }
        else {var selectId = $('#tongxiuzhong .mui-active').data('user_transcription_id');changeText();}
        $("#scroll .tab_div").css("display","none");
        $("#scroll .tab_div").eq(i).css("display","block");
    });

//    mui('body').on('tap','a',function(){document.location.href=this.href;});
</script>
<script>

    function getCookie(name) {
                var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
                if (arr != null) return unescape(arr[2]);
                return null;
            }

            var csrftoken = getCookie('csrftoken');
            var versionId = localStorage.getItem('versionId');
            var msg1 = localStorage.getItem('message');
            var msg2 = JSON.parse(msg1);
            var configData;
            var currentUrl = window.location.href.split('#')[0];
                $.when(

                // 获取config数据
                $.ajax({
                        url: '/fe/user/js_sign',
                        type: 'POST',
                        beforeSend: function(xhr, settings) {
                            xhr.setRequestHeader("X-CSRFToken", csrftoken);
                        },
                        data: {
                            "url": currentUrl,
                        },
                        success: function(data) {
                            configData = data.data;
                        },
                        error: function(xhr, status, error){
                                if (xhr.status == 403 ){
                                	$.ajax({
                                	    url: '/fe/user/login',
                                	    success: function (data) {
                                	        console.log(data);
                                	        location.href = data.url;
                                	    },
                                	    error: function (error) {
                                	        console.log('no');
                                	        console.log(error);
                                	    }
                                	});

                                }
                            }
                    })

                ).then(function() {
                 wx.config({
                    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。

                    appId: configData.appid,
                    timestamp: configData.timestamp,
                    nonceStr: configData.noncestr,
                    signature: configData.sign,

                    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage']
                });
                
            var yaoqing = $('#yaoqing');
            yaoqing.on("tap",function (){
                $("#mcover").css("display","block");
              wx.onMenuShareTimeline({
                        title:'修德抄经堂',
                        link:'http://bk-bbe.com/web/front/zhuchao.html',
                        imgUrl: '', // 分享图标
                        success: function () {
                            // 用户确认分享后执行的回调函数
                        },
                        cancel: function () {
                            // 用户取消分享后执行的回调函数
                        }
                    })
              var userTranscriptionID = localStorage.getItem('userTranscriptionID');
                var a = 'http://bk-bbe.com/web/front/zhuchao.html?id='+userTranscriptionID+"&vid="+versionId;
              wx.onMenuShareAppMessage({

                title: '修德抄经堂', // 分享标题

                desc: '', // 分享描述

                link: a, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致

                imgUrl: '', // 分享图标

                type: '', // 分享类型,music、video或link，不填默认为link

                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空

                success: function () { 

                    // 用户确认分享后执行的回调函数

                },

                cancel: function () { 

                    // 用户取消分享后执行的回调函数

    }

});
});
					$('#fenxiang').on('tap',function () {
						$("#mcover").css("display","block");
						wx.onMenuShareTimeline({
							title:'修德抄经堂',
							link:'http://bk-bbe.com/web/front/read_jingjin.html?x=yiwancheng',
							imgUrl: '', // 分享图标
							success: function () {
								// 用户确认分享后执行的回调函数
							},
							cancel: function () {
								// 用户取消分享后执行的回调函数
							}
						})
						var userTranscriptionID = localStorage.getItem('userTranscriptionID');
						// var a = 'http://bk-bbe.com/web/front/zhuchao.html?id='+userTranscriptionID+"&vid="+versionId;
						var a = 'http://bk-bbe.com/web/front/read_fenxiang.html?x=yiwancheng&vid='+versionId+'&id='+userTranscriptionID;
						wx.onMenuShareAppMessage({

							title: '修德抄经堂', // 分享标题

							desc: '', // 分享描述

							link: a, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致

							imgUrl: '', // 分享图标

							type: '', // 分享类型,music、video或link，不填默认为link

							dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空

							success: function () {

								// 用户确认分享后执行的回调函数

							},

							cancel: function () {

								// 用户取消分享后执行的回调函数

							}
						})
				});
			$("#mcover").click(
				function(){
					$("#mcover").css("display","none");  // 点击弹出层，弹出层消失
				});
			})
			$('.page').on('click','#zhuchao',function(){
				function getCookie(name) {
					var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
					if (arr != null) return unescape(arr[2]);
					return null;
				}
				var versionId = localStorage.getItem('versionId');
				var csrftoken = getCookie('csrftoken');
				var userTranscriptionID = localStorage.getItem('userTranscriptionID');
				$.ajax({
					url: '/fe/assistance/user_transcription/'+userTranscriptionID,
					async: false,
					type: "post",
					beforeSend: function(xhr, settings) {
						xhr.setRequestHeader("X-CSRFToken", csrftoken);
					},
					success: function (data) {
						if(data.status=='410'){
							alert('已抄完');
						}
						else if(data.status=='403'){
							alert('不能助抄自己的经书');
						}else{
							var page_num = data.data.page_num;
							location.href='zhuchaoxie.html?id='+userTranscriptionID + '&pagenum=' + page_num+'&vid=' + versionId+'&last=jingjin.html';
						}
					}
				});
			})
</script>


</html>
